<?php
/**
 * 系統名稱: Lotto 系統
 * 檔案說明: 專案管理-修改
 * $Author$
 * $Id$
 *
 */

//取出此期賽程
if(is_array($_arrGamble))list($intGID, $arrGamble) = each($_arrGamble);
if(empty($intGID)){
	$arrGamble = getNewGambleData($intLID, 0);
	if($arrGamble === false){
		ErrMsgOutputHTML("Error", "", 1);
	}
	if(sizeof($arrGamble) == 0){
		$arrGamble = getNewGambleData($intLID, 1);
		if($arrGamble === false){
			ErrMsgOutputHTML("Error", "", 1);
		}
	}
	$intGID = $arrGamble["ID"];
}

if(!empty($intGID))$_strGDate = DateForm($arrGamble["GameDate"], $arrGamble["GameTime"], "Y-m-d", "UToC")."&nbsp;".TimeForm($arrGamble["GameDate"], $arrGamble["GameTime"], "h:i a", "UToC");

$arrTmp = explode("-", $arrLotto["Number"]);
for($i = intval($arrTmp[0]); $i <= intval($arrTmp[1]); $i++)$_strNumber .= $i.",";
$_strNumber = substr($_strNumber, 0, strlen($_strNumber) - 1);
$arrTOGap = explode(",", $_arrLotto[$intLID]["ThroughOddsGap"]);

?><!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title> <?php print $_strRealBet["Title"];?> (Add) </title>
<link rel="stylesheet" href="../../css/mem_main.css" type="text/css">
<link rel="stylesheet" href="../../css/backend.css?time=01" type="text/css">
<style>
<!--
#OddsTable { background-color: #DFDFDF }
.G_tabble_title { background-color: #000000 }
#odds_win { background:#AAAAAA; width:120px; margin:auto;}
#wager_win  { background:#AAAAAA; width:485px; margin:auto;}
#odds_win_table { border:#000000 1px solid; background:#FFFFFF; position: relative; left: -5px; top: -5px; }
#wager_win_table { border:#000000 1px solid; background:#FFFFFF; position: relative; left: -5px; top: -5px; }
//-->
</style>
<script language="JavaScript1.2" type="text/javascript" src="/inc/ajax_begin.js?time=01"></script>
<script language="JavaScript1.2" type="text/javascript" src="/inc/OperateComm.js?time=01"></script>
<script language="JavaScript1.2" type="text/javascript" src="/inc/RealBetData.js?time=01"></script>
<script language="JavaScript1.2" type="text/javascript" src="/common/betparam/AnimalsParams_<?php print $intLID;?>.js?time=01"></script>
<script language="JavaScript1.2" type="text/javascript" src="/common/gambletype/GambleType<?php print $intLID;?>.js?time=01"></script>
<script language="JavaScript1.2" type="text/javascript" src="/inc/RealBet2Temp<?php print $_intLang?>.js?time=01"></script>
<script language="JavaScript">
<!--
var PageConfig = {};
PageConfig.SortPlus = -1;
PageConfig.SortType = 0;
PageConfig.NowBetType = "1,2,3,16";
PageConfig.NowBTIsParlays = false;
PageConfig.ChangeBT = 1;
PageConfig.isEmergency = 0;
PageConfig.LottoID = "<?php print $intLID;?>";
PageConfig.GambleID = "<?php print $intGID;?>";
PageConfig.LottoNum = "<?php print $_strNumber;?>";
PageConfig.SpecialOverNumber = "<?php print $arrLotto["SpecialOverNumber"];?>";
PageConfig.NormalOverNumber =  "<?php print $arrLotto["NormalOverNumber"];?>";
PageConfig.isShowAVOdds = "<?php print $isShowAVOdds;?>";
PageConfig.BColor_Index = new Array(<?php print $arrLotto["ColorSet"];?>);
PageConfig.BColor_Value = new Array("red", "blue", "green");
PageConfig.NowOddsLayer = "";
PageConfig.HTTP_HOST = "<?php print str_replace(':', '', str_replace('.', '', $_SERVER["HTTP_HOST"])); ?>";
PageConfig.NewUpdateTime = -1;
PageConfig.NewOddsID = -1;
PageConfig.isRealShow = 1; //實貨 or 虛貨
PageConfig.UpdateBetType = "";
PageConfig.isShowSpAllWin = false; //是否顯示特別號單號總輸贏
PageConfig.isABMerge = true; //特碼AB是否合併顯示
PageConfig.GLine = 1; //分盤
PageConfig.UserGroup = "<?php print $_SESSION["Admin_Info"] -> MemberGroup;?>"; //使用者階層

var RSeconds = 0;
var isEmergency = 0;
var AutoRefreshID = 0;

var arrCommion = [0 <?php for($i = 1; $i < sizeof($_KBetTypeParam); $i++)print ", ".(1 - $_KBetTypeParam[$i]["A_Commission_MinValue"]/100);?>];
var intSortSite = 0;
var objOddsData = {};
var arrBTTOGap = [];
arrBTTOGap[12] = [<?php print $arrTOGap[0];?>, <?php print $arrTOGap[0];?>];
arrBTTOGap[13] = [<?php print $arrTOGap[1];?>, <?php print $arrTOGap[1];?>];
arrBTTOGap[14] = [<?php print $arrTOGap[3];?>, <?php print $arrTOGap[4];?>, <?php print $arrTOGap[5];?>];

var arrSumStake = [], arrSumPayOff = [], arrSumCommission = [], arrSumSStake = [], arrSumSPayOff = [], arrSumSCommission = [];
var arrSumSubNo = [12, 13, 14, 27, 29, 30];
for(var i = 0; i < arrSumSubNo.length; i++){
	arrSumStake[arrSumSubNo[i]] = [];
	arrSumPayOff[arrSumSubNo[i]] = [];
	arrSumCommission[arrSumSubNo[i]] = [];
	arrSumSStake[arrSumSubNo[i]] = [];
	arrSumSPayOff[arrSumSubNo[i]] = [];
	arrSumSCommission[arrSumSubNo[i]] = [];
}

var objBTConfig = Class.create();
objBTConfig = {
	initialize: function(){},

	getBTSite: function(intBT){
		var intSite = intBT;
		if(intBT == 28){
			intSite = 1;
		}else if(intBT >= 21 && intBT <= 26){
			intSite = 21;
		}
		return intSite;
	},

	getIsNotShowPlusMinusForm: function(intBT){
		return (intBT >= 7 && intBT <= 11)?1:0;
	},

	getIsNotShowPreWinForm: function(intBT){
		var strBT = ",4,7,8,9,10,11,15,19,20,31,32,33,34,35,36,37,38,39,40,41,42,43,";
		return (strBT.indexOf("," + intBT.toString() + ",") > -1)?1:0;
	},

	getBTSorter: function(intBT){
		var strBT = ",1,4,21,22,23,24,25,26,28,31,";
		return (strBT.indexOf("," + intBT.toString() + ",") > -1)?1:0;
	},

	getBTSortType: function(intBT){
		var strBT = ",1,21,22,23,24,25,26,28,";
		return (strBT.indexOf("," + intBT.toString() + ",") > -1)?1:2;
	},

	getIsSuppleBT: function(intBT){
		var strBT = ",15,";
		return (strBT.indexOf("," + intBT.toString() + ",") > -1)?0:1;
	},

	getShowAllWin: function(intBT){
		return (intBT == 1)?1:0;
	},

	getOtherStake: function(intBT, intNum){
		if(PageConfig.isABMerge && (intBT == 1 || intBT == 28)){
			intBT = (intBT == 1)?28:1;
			var objO = objOddsData[intBT.toString() + "_" + intNum.toString()];
			return ((PageConfig.isRealShow == 1)?objO.WData.tolRS:objO.WData.tolS) - objO.WData.tolSS;
		}
		return 0;
	},

	getOtherPayOff: function(intBT, intNum){
		if(PageConfig.isABMerge && (intBT == 1 || intBT == 28)){
			intBT = (intBT == 1)?28:1;
			var objO = objOddsData[intBT.toString() + "_" + intNum.toString()];
			return ((PageConfig.isRealShow == 1)?objO.WData.tolRP:objO.WData.tolP) - objO.WData.tolSP;
		}
		return 0;
	},

	getOtherCommision: function(intBT, intNum){
		if(PageConfig.isABMerge && (intBT == 1 || intBT == 28)){
			intBT = (intBT == 1)?28:1;
			var objO = objOddsData[intBT.toString() + "_" + intNum.toString()];
			return (PageConfig.isRealShow == 1)?(objO.WData.tolC - objO.WData.tolSC):0;
		}
		return 0;
	},

	getOtherPreWin: function(intBT, intNum){
		if(PageConfig.isABMerge && (intBT == 1 || intBT == 28)){
			intBT = (intBT == 1)?28:1;
			var objO = objOddsData[intBT.toString() + "_" + intNum.toString()];
			return (PageConfig.isRealShow == 1)?objO.preRealWin:objO.preWin;
		}
		return 0;
	},

	getOtherSumStake: function(intBT){
		if(PageConfig.isABMerge && (intBT == 1 || intBT == 28)){
			intBT = (intBT == 1)?28:1;
			return arrSumStake[intBT];
		}
		return 0;
	},

	getBTAN: function(intBT, intNum){
		return 0;
	}, 

	getBTGLine: function(intBT, intNum){
		var intAN = this.getBTAN(intBT, intNum);
		if(arrGLine[PageConfig.GLine][intBT] == null)return 0;
		if(arrGLine[PageConfig.GLine][intBT][intAN] == null)return 0;
		return arrGLine[PageConfig.GLine][intBT][intAN];
	},

	getIsShowSpecialPreWin: function(intBT){
		return (intBT == 30)?1:0;
	},

	getSpecialPreWin: function(objO){
		var intBT = objO.OData.BT;
		var intNum = objO.OData.Num;
		if(intNum < 13){
			if(PageConfig.isRealShow == 1){
				return Math.round(arrSumStake[intBT][0] - ((objO.WData.tolRS - objO.WData.tolSS) + (objO.WData.tolRP - objO.WData.tolSP))*6 - arrSumCommission[intBT][0]);
			}else{
				return Math.round(arrSumStake[intBT][0] - ((objO.WData.tolS - objO.WData.tolSS) + (objO.WData.tolP - objO.WData.tolSP))*6 - arrSumCommission[intBT][0]);
			}
		}else{
			if(PageConfig.isRealShow == 1){
				return Math.round((objO.WData.tolRS - objO.WData.tolSS + objO.WData.tolRP)*6 - arrSumPayOff[intBT][1] - arrSumCommission[intBT][1]);
			}else{
				return Math.round((objO.WData.tolS - objO.WData.tolSS + objO.WData.tolP)*6 - arrSumPayOff[intBT][1] - arrSumCommission[intBT][1]);
			}
		}
	}
}

var arrGame = [];
var arrWager = [];
for(var i = 1; i <= 43; i++){
	arrGame[i] = [];
	arrWager[i] = [];
}

for(var i = 1; i <= 12; i++){
	OddsLayer.Layer17 = OddsLayer.Layer17.replace("{AnimalsNumber"+i+"}", eval("strAnimals"+i));
	OddsLayer.Layer19 = OddsLayer.Layer19.replace("{AnimalsNumber"+i+"}", eval("strAnimals"+i));
}

//取得特別號總輸贏
function getSPNumAllWin(intNum){
	var strAnimals = "", flWin = 0;
	var intSum = Math.floor(intNum / 10) + intNum % 10;
	var intColorNum = PageConfig.BColor_Index[intNum - 1];
	var intN1 = (intNum % 2 == 1)?(intColorNum*4):(intColorNum*4 + 1);
	var intN2 = (intNum >= PageConfig.SpecialOverNumber*1)?(intColorNum*4 + 2):(intColorNum*4 + 3);
	var strNum = intNum.toString();
	if(intNum < 10)strNum = "0" + strNum;

	//單雙
	flWin += (intNum % 2 == 1)?objOddsData["2_0"].getPreWinByIsReal():objOddsData["2_1"].getPreWinByIsReal();
	//大小
	flWin += (intNum >= PageConfig.SpecialOverNumber*1)?objOddsData["3_0"].getPreWinByIsReal():objOddsData["3_1"].getPreWinByIsReal();
	//合單雙
	flWin += (intSum % 2 == 1)?objOddsData["16_0"].getPreWinByIsReal():objOddsData["16_1"].getPreWinByIsReal();
	//色波
	flWin += objOddsData["17_" + intColorNum].getPreWinByIsReal();
	//生肖
	for(var i = 1; i <= 12; i++){
		strAnimals = eval("strAnimals" + i);
		if(strAnimals.indexOf(strNum) > -1){
			intAnimal = i;
			break;
		}
	}
	flWin += objOddsData["18_" + intAnimal].getPreWinByIsReal();
	//半波
	flWin += objOddsData["29_" + intN1.toString() ].getPreWinByIsReal();
	flWin += objOddsData["29_" + intN2.toString() ].getPreWinByIsReal();
	//六肖
	flWin += objOddsData["30_" + intAnimal].getPreWinByIsReal();
	return flWin;
}

function getSumNumber(intBT, intNum){
	switch(intBT){
		case 29:
			return Math.floor((intNum % 4) / 2);
			break;

		case 30:
			return (intNum > 12)?1:0;
			break;

		default:
			return Math.floor((intNum*1) /10);
			break;
	}
}

//預先統計各下注總注額
function setAllSumStake(){
	var intBT = 0, intN = 0, intNum = 0, tolStake = 0, tolPayOff = 0, tolCommission = 0, strID = "", objWager;
	var arrUpBT = PageConfig.UpdateBetType.split(",");
	for(var i = 0; i < arrUpBT.length; i++){
	//for(var intBT in arrGame){
		intBT = arrUpBT[i]*1;
		switch(intBT){
			case 15:
				setOddsToParlays();
			case 12:
			case 13:
			case 14:
			case 27:
			case 29:
			case 30:
				arrStake = [];
				arrPayOff = [];
				arrCommission = [];
				arrSStake = [];
				arrSPayOff = [];
				arrSCommission = [];
				break;

			default:
				arrStake = 0;
				arrPayOff = 0;
				arrCommission = 0;
				arrSStake = 0;
				arrSPayOff = 0;
				arrSCommission = 0;
				break;
		}

		for(var intNo in arrGame[intBT]){
			if(arrWager[intBT][intNo] == null){
				arrWager[intBT][intNo] = {tolW: 0, tolS: 0, tolP: 0, tolC: 0, tolRS: 0, tolRP: 0, tolSS: 0, tolSP: 0, tolSC: 0};
			}
			objWager = arrWager[intBT][intNo];
			intNum = arrGame[intBT][intNo].Num;
			if(PageConfig.isRealShow == 1){
				tolStake = objWager.tolRS - objWager.tolSS;
				tolPayOff = objWager.tolRP - objWager.tolSP;
				tolCommission = objWager.tolC - objWager.tolSC;
			}else{
				tolStake = objWager.tolS - objWager.tolSS;
				tolPayOff = objWager.tolP - objWager.tolSP;
				tolCommission = 0;// - objWager.tolSC;
			}
			switch(intBT){
				case 15:
				case 12:
				case 13:
				case 14:
				case 27:
					intN = Math.floor(intNum / 10);
					break;

				case 29:
					intN = Math.floor((intNum % 4) / 2);
					break;

				case 30:
					intN = (intNum > 12)?1:0;
					break;

				default:
					arrStake += tolStake;
					arrPayOff += tolPayOff;
					arrCommission += tolCommission;
					arrSStake += objWager.tolSS;
					arrSPayOff += objWager.tolSP;
					arrSCommission += objWager.tolSC;
					break;
			} // switch(intBT){ //

			if(typeof(arrStake) == "object"){
				if(arrStake[intN] == null)arrStake[intN] = 0;
				if(arrPayOff[intN] == null)arrPayOff[intN] = 0;
				if(arrCommission[intN] == null)arrCommission[intN] = 0;
				arrStake[intN] += tolStake;
				arrPayOff[intN] += tolPayOff;
				arrCommission[intN] += tolCommission;
				arrSStake[intN] += objWager.tolSS;
				arrSPayOff[intN] += objWager.tolSP;
				arrSCommission[intN] += objWager.tolSC;
			}
		} // for(var intNo = 0; intNo < arrGame[intBT].length; intNo++){ //
		arrSumStake[intBT] = arrStake;
		arrSumPayOff[intBT] = arrPayOff;
		arrSumCommission[intBT] = arrCommission;
		arrSumSStake[intBT] = arrSStake;
		arrSumSPayOff[intBT] = arrSPayOff;
		arrSumSCommission[intBT] = arrSCommission;
	} // for(var i = 0; i < arrNowBT.length; i++){ //
}

//將 過關 相關賠率 轉至 過關 物件陣列
function setOddsToParlays(){
	var arrBT = [ 12, 13, 14 ];
	var arrNum = [ [0, 1], [0, 1], [0, 1, 2] ];
	var intID = 0, intBT = 0, intNum = 0;

	for(var i = 0; i < arrBT.length; i++){
		for(var j = 0; j < arrNum[i].length; j++){
			for(var k = 1; k <= 6; k++){
				intBT = arrBT[i];
				intNum = k*10 + arrNum[i][j];
				intID = intBT*100 + intNum;

				if(arrGame[intBT][intNum] == null)continue;
				if(arrWager[15][intID] == null)arrWager[15][intID] = {tolW: 0, tolS: 0, tolP: 0, tolC: 0, tolRS: 0, tolRP: 0};
				if(arrGame[15][intID] == null)arrGame[15][intID] = {};
				arrGame[15][intID].BT = intBT;
				arrGame[15][intID].Num = intNum;
				arrGame[15][intID].Odds = Math.round((arrGame[intBT][intNum].Odds + arrBTTOGap[intBT][j])*1000)/1000;
				arrGame[15][intID].isStop = arrGame[intBT][intNum].isStop;
			}
		}
	}
}

//取得目前下注種類
function getChangeNowBetType(){
	var strNowBT = PageConfig.NowBetType;
	if(strNowBT == "15"){
		PageConfig.NowBTIsParlays = true;
		return [15];
	}
	PageConfig.NowBTIsParlays = false;
	return strNowBT.split(",");
}

//載入號碼
function setOddsNumber(intBT){
	switch(intBT){
		case 1:
		case 4:
		case 21:
		case 22:
		case 23:
		case 24:
		case 25:
		case 26:
		case 28:
		case 31:
			var strBTSite = objBTConfig.getBTSite(intBT);

			for(var intNum = 1; intNum <= 49; intNum++){
				setNumberForm(intBT, intNum, intNum, strBTSite);
			}
			break;
	}
}

//選擇特碼 A or B 或 AB合併
function getSelectSpLine(intSNT){
	var intBT = 1, intSpecialNumType = 1;
	PageConfig.isABMerge = true;
	switch(intSNT*1){
		case 2:
			intBT = 28;
			break;
	}
	ChangeBet(intBT);
}

//更改下注種類賠率表
function ChangeBet(intBT){
	close_WagerWin();
	PageConfig.ChangeBT = intBT;
	switch(intBT){
		//特碼
		case 1:
		case 28:
			PageConfig.NowBetType = (intBT == 1)?"1,2,3,16":"28,2,3,16";
			break;
		//正碼
		case 4:
			PageConfig.NowBetType = "4,5,6";
			break;
		//連碼
		case 7:
			PageConfig.NowBetType = "7,8,9,10,11";
			break;
		//正碼 1-6
		case 12:
			PageConfig.NowBetType = "12,13,14,27";
			break;
		//正碼 過關
		case 15:
			PageConfig.NowBetType = "15";
			break;
		//特碼生肖色波
		case 17:
			PageConfig.NowBetType = "17,18,30";
			break;
		//一般生肖尾數
		case 19:
			PageConfig.NowBetType = "19,20";
			break;
		//正1-6特碼
		case 21:
		case 22:
		case 23:
		case 24:
		case 25:
		case 26:
			PageConfig.NowBetType = intBT.toString();
			break;
		//半波
		case 29:
			PageConfig.NowBetType = "29";
			break;
		//五不中
		case 31:
			PageConfig.NowBetType = "31";
			break;
		//生肖連
		case 32:
			PageConfig.NowBetType = "32,33,34,35,36,37";
			break;
		//尾數連
		case 38:
			PageConfig.NowBetType = "38,39,40,41,42,43";
			break;
	}
	document.getDataForm["Bet_Type"].value = PageConfig.NowBetType;
	iniOddsLayer(intBT);
	document.getDataForm.op.value = "GetOdds";
	GetOdds();
}

//取得下注明細
function getWagerData(strOddsID, event) {
	var objO = objOddsData[strOddsID];
	var intBT = objO.OData.BT*1;
	var strBT = intBT.toString();

	if(intBT == 1 || intBT == 28){
		var strSNType = document.getDataForm.SpecialNumType.value;
		if(strSNType == "1" || strSNType == "2"){strBT = "1,28";}
	}
	var strDocLoc="getWager.xml.php?GambleID="+objO.OData.GID+"&Bet_Type="+strBT+"&Number="+objO.OData.Num+"&isStop="+objO.OData.isStop+"&isRealShow="+PageConfig.isRealShow;
	if(PageConfig.NowBetType == "15")strDocLoc += "&isParlays=1";
	if(intBT >= 31 && intBT < 43)strDocLoc += "&isParlays=2";

	setWagerDataLink(strDocLoc, event);
}

function iniAction(){
	iniOddsLayer(1);
	GetOdds();
}
//-->
</script>
</head>

<body class="Mybody" onload="iniAction();">
<form action="index.php" target="_self" method="Get" name="OddsListForm">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="cmti">
  <tr> 
    <td><?php print $_strRealBet["Title"];?>
	<?php print MakeLottoSelect($_arrLotto, $intLID, "LottoID", "LottoSelect()", $_intLang)?>
      -- 
		<select onchange="ChangeReal(this)">
			<option value="0">-<?php print $_strRealBet["AllBet"];?>-</option>
			<option value="1" selected>-<?php print $_strRealBet["RealBet"];?>-</option>
		</select>
      -- 
		<?php print $_strRealBet["RefreshWay"];//更新：?>
		<select onchange="ChangeRefreshSec(this)">
			<option value="">-No-</option>
			<option value="5">5 sec</option>
			<option value="10">10 sec</option>
			<option value="20">20 sec</option>
			<option value="30">30 sec</option>
			<option value="40">40 sec</option>
			<option value="50">50 sec</option>
			<option value="60">60 sec</option>
		</select>&nbsp;<input type="button" class="submit" value="<?php print $_strRealBet["Reset"];//重新整理?>" onclick="RefreshType();">
      -- 
		<?php print $_strRealBet["LineKind"];//分盤：?>
		<select name="GambleType" onchange="ChangeGambleType(this)">
		<?php
			$arrLine = explode(",", $_KSysParam[GambleLineShowSetting]);
			foreach($arrLine as $k => $v){
				if(empty($v))continue;
				if($_data["GameType"] == $k){
					print '<option value="'.$k.'" selected>'.$v.'</option>\n';
				}else{
					print '<option value="'.$k.'">'.$v.'</option>\n';
				}
			}
		?>
		</select>
      -- <?php print $_strRealBet["SortType"];?>
		<select id="SortType" onChange="setSortType(this.value)">
		<option value='0' selected><?php print $_strRealBet["SortType0"];?></option>
		<option value='1'><?php print $_strRealBet["SortType1"];?></option>
		</select>
      -- <?php print $_strRealBet["GameNo"];//期數?><b style="font-size: 16">&nbsp;:&nbsp;</b><a class="G_Sec"><?php print $arrGamble["SerialNo"];?></a> ( <a class="G_Sec"><?php print $_strGDate;?></a> ) 
      -- <?php print $_strRealBet["RefreshSec"];//更新秒數：?><a class="G_Sec" id="RSec">--</a>
	   &lt;&lt;<a href="JavaScript:getNowWagerItemSort()">Sort</a>&gt;&gt;
    </td>
  </tr>
</table>

<table width="100%" border="0" cellspacing="1" cellpadding="0" class="ctab" style="border: 1px #083872 solid; padding: 1px;">
    <tr class="ctiga2"> 
	<td>
	  <table width="100%" border="0" cellspacing="0" cellpadding="0">
	    <tr>
		  <td width="10%"><a href="JavaScript:void(1)" class="while_link"><?php print $_strRealBet["ListStatus"];//目前表單狀態：?></a><a id="ListStatus" class="G_Sec">Special Ball</a></td>
		  <td width="90%">
			<!--########## 特碼 ##########//-->
				<a href="JavaScript:ChangeBet(1)" id="M_OETG" class="while_link"><?php print $_strRealBet["SpecialNumber"];//特碼?></a>&nbsp;<input type="checkbox" onclick="PageConfig.isShowSpAllWin=(PageConfig.isShowSpAllWin)?false:true">
			<!--########## 正碼 ##########//-->
				&nbsp;<a class="a_text">|</a>&nbsp;
				<a href="JavaScript:ChangeBet(4)" id="M_CS" class="while_link"><?php print $_strRealBet["NormalNumber"];//正碼?></a>
			<!--########## 連碼 ##########//-->
				&nbsp;<a class="a_text">|</a>&nbsp;
				<a href="JavaScript:ChangeBet(7)" id="M_CS" class="while_link"><?php print $_strRealBet["JoinNumber"];//連碼?></a>
			<!--########## 正特碼 ##########//-->
				&nbsp;<a class="a_text">|</a>&nbsp;
				<a href="JavaScript:ChangeBet(21)" id="M_CS" class="while_link"><?php print $_strRealBet["NormalSpecial"];//正特碼?></a>
			<!--########## 正碼1-6 ##########//-->
				&nbsp;<a class="a_text">|</a>&nbsp;
				<a href="JavaScript:ChangeBet(12)" id="M_CS" class="while_link"><?php print $_strRealBet["NormalNumber1_6"];//正碼1-6?></a>
			<!--########## 正碼過關 ##########//-->
				&nbsp;<a class="a_text">|</a>&nbsp;
				<a href="JavaScript:ChangeBet(15)" id="M_CS" class="while_link"><?php print $_strRealBet["NormalNumberParlays"];//正碼過關?></a>
			<!--########## 特碼生肖色波 ##########//-->
				&nbsp;<a class="a_text">|</a>&nbsp;
				<a href="JavaScript:ChangeBet(17)" id="M_CS" class="while_link"><?php print $_strRealBet["AnimalsColor"];//特碼生肖色波?></a>
			<!--########## 一般生肖尾數 ##########//-->
				&nbsp;<a class="a_text">|</a>&nbsp;
				<a href="JavaScript:ChangeBet(19)" id="M_CS" class="while_link"><?php print $_strRealBet["AnimalsMantissa"];//一般生肖尾數?></a>
			<!--########## 半波 ##########//-->
				&nbsp;<a class="a_text">|</a>&nbsp;
				<a href="JavaScript:ChangeBet(29)" id="M_CS" class="while_link"><?php print $_strRealBet["HelfColor"];//半波?></a>
			<!--########## 五不中 ##########//-->
				&nbsp;<a class="a_text">|</a>&nbsp;
				<a href="JavaScript:ChangeBet(31)" id="M_CS" class="while_link"><?php print $_strRealBet["FiveNotWin"];//五不中?></a>
			<!--########## 生肖連 ##########//-->
				&nbsp;<a class="a_text">|</a>&nbsp;
				<a href="JavaScript:ChangeBet(32)" id="M_CS" class="while_link"><?php print $_strRealBet["AnimalsJN"];//生肖連?></a>
			<!--########## 尾數連 ##########//-->
				&nbsp;<a class="a_text">|</a>&nbsp;
				<a href="JavaScript:ChangeBet(38)" id="M_CS" class="while_link"><?php print $_strRealBet["MantissaJN"];//尾數連?></a>
			<!--########## 已開獎 ##########//-->
				&nbsp;<a class="a_text">|</a>&nbsp;
				<a href="JavaScript:StartGame()" id="M_CS" class="while_link"><?php print $_strRealBet["StartGame"];//已開獎?></a>
		  </td>
	    </tr>
	  </table>
	</td>
    </tr>
    <tr class="clef">
	<td><span id="BetList"></span></td>
    </tr>
</table>
</form>

<!----------------------下注明細圖層---------------------------->
<div id="wager_win" style="display: none;position:absolute">
<table width="120" border="0" cellspacing="1" cellpadding="2" bgcolor="00558E" id="wager_win_table">
<tr><td bgcolor="#FFFFFF">
<table width="120" border="0" cellspacing="0" cellpadding="0" class="m_tab_fix" >
<tr bgcolor="0163A2"> 
<td width="100" style="font-size:12px"><font color="#FFFFFF">&nbsp;<?php print $_strRealBet["WagerList"];?></td>
<td align="right" valign="top" ><a style="cursor:hand;" onClick="close_WagerWin();"><img src="/images/k_admin/edit_dot.gif" width="16" height="14"></a></td>
</tr>
<tr bgcolor="#000000"><td colspan="2" height="1"></td></tr>
<tr bgcolor="#FFCC66"> 
<td colspan="2">
<div style="height:300px; overflow:auto; overflow-x:hidden;" id="WagerLayer">
<table id="WagerTable" class="MyTable" cellspacing="1" cellpadding="3" style="width: 483px;">
<tr align="center">
	<td width="60" class="MyTitleL"><?php print $_strRealBet["WGameTime"];?></td>
	<td width="80" class="MyTitleL"><?php print $_strRealBet["WAccount"];?></td>
	<td width="170" class="MyTitleL"><?php print $_strRealBet["WCont"];?></td>
	<td width="70" class="MyTitleL"><?php print $_strRealBet["WStake"];?></td>
	<td width="70" class="MyTitleL"><?php print $_strRealBet["WResult"];?></td>
</tr>
</table>
</div>
</td></tr></table>
</td></tr></table>
</div>

<!----------------------下注明細圖層----------------------------> 
<iframe src="" width="50" height="50" name="getData" frameBorder="0" scrolling="no"></iframe>
<form action="index.php" target="getData" name="getDataForm">
<input type="hidden" name="op" value="GetOdds">
<input type="hidden" name="LottoID" value="<?php print $intLID;?>">
<input type="hidden" name="GambleID" value="<?php print $intGID;?>">
<input type="hidden" name="Bet_Type" value="1,2,3,16">
<input type="hidden" name="SpecialNumType" value="1">
<input type="hidden" name="NewUpdateTime" value="-1">
<input type="hidden" name="OddsID" value="-1">
</form>
</body>
</html>